<div class="panel panel-danger" ng-if="!success">
    <div class="panel-heading">
        <strong>{{artifact.data | fang}}</strong>
    </div>
    <div class="panel-body">
        {{content.errorMessage}}
    </div>
</div>


<div class="panel panel-info" ng-if="success">
	<div class="panel-heading">
		OTX Report
	</div>
	<div class="panel-body">

		<dl class="dl-horizontal" ng-if="content.errortext">
			<dt><i class="fa fa-warning"></i> ERROR: </dt>
			<dd class="wrap">{{content.errortext}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal">
			<dt>Related Pulses Found: </dt>
			<dd class="wrap">{{content.pulse_count}}</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.pulse_count > 0">
			<dt>Related Pulses: </dt>
			<dd class="wrap">
			<div ng-repeat="pulse in ::content.pulses | limitTo:4">
				<strong>Name: </strong><a ng-href="https://otx.alienvault.com/pulse/{{::pulse.id}}/" target="_blank">{{::pulse.name}}</a><br/>
				<strong>Author: </strong>{{::pulse.author.username}}<br/>
				<strong>Modified: </strong>{{::pulse.modified_text}} @ {{::pulse.modified}} <br/>
				<strong>Subscribers: </strong>{{::pulse.subscriber_count}} <br/>
				<strong>Subscribed: </strong>{{::pulse.is_subscribing}} <br/>
				<strong>Industries: </strong>{{::pulse.industries}} <br/>
				<strong>Indicators: </strong>{{::pulse.indicator_count}}
				<hr>
			</div>
			</dd>
		</dl>

		<dl class="dl-horizontal">
			<dt>Submit Pulse: </dt>
			<dd class="wrap">
				<i class="fa fa-bullhorn"></i> <a ng-href="https://otx.alienvault.com/pulse/create/" target="_blank">Create a Pulse</a>&nbsp;
			</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.malware_samples !== 'No samples found'">
			<dt>Malware Samples: </dt>
			<dd class="wrap">
				<div ng-repeat="sample in ::content.malware_samples | limitTo:20">
					{{::sample.sample}}
				</div>
			</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.malware.length > 0">
			<dt>Malware: </dt>
			<dd class="wrap">{{content.malware}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.sha1.length > 0">
			<dt>SHA1: </dt>
			<dd class="wrap">{{content.sha1}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.sha256.length > 0">
			<dt>SHA256: </dt>
			<dd class="wrap">{{content.sha256}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.md5.length > 0">
			<dt>MD5: </dt>
			<dd class="wrap">{{content.md5}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.page_type">
			<dt>Page Type: </dt>
			<dd class="wrap">{{content.page_type}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.file_class">
			<dt>File Class: </dt>
			<dd class="wrap">{{content.file_class}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.file_type">
			<dt>File Type: </dt>
			<dd class="wrap">{{content.file_type}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.filesize">
			<dt>File Size: </dt>
			<dd class="wrap">{{content.filesize}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.ssdeep">
			<dt>SSDEEP: </dt>
			<dd class="wrap">{{content.ssdeep}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.url_list.length > 0">
			<dt>Related URLs: </dt>
			<dd class="wrap">
			<div ng-repeat="url in ::content.url_list | limitTo:20">
				<strong>URL: </strong>{{::url.url}} <br/>
				<strong>Date: </strong>{{::url.date}} <br/>
				<strong>HTTP Code: </strong>{{::url.httpcode}} <br/>
				<strong>IP: </strong>{{::url.result.urlworker.ip}}
				<hr>
			</div>
			</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.passive_dns.length > 2">
			<dt>Passive DNS: </dt>
			<dd class="wrap">
			<div ng-repeat="dns in ::content.passive_dns | limitTo:20">
				<strong>Hostname: </strong>{{::dns.hostname}} <br/>
				<strong>IP: </strong>{{::dns.address}} <br/>
				<strong>First/Last seen: </strong>{{::dns.first}} / {{::dns.last}} <br/>
				<strong>Locale: </strong>{{::dns.flag_title}}
				<hr>
			</div>
			</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.whois">
			<dt>Whois: </dt>
			<dd class="wrap">
				<i class="fa fa-search"></i> <a ng-href="{{content.whois}}" target="_blank">Whois Query</a>&nbsp;
			</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.alexa">
			<dt>Alexa: </dt>
			<dd class="wrap">
				<i class="fa fa-search"></i> <a ng-href="{{content.alexa}}" target="_blank">Alexa Report</a>&nbsp;
			</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.city">
			<dt>City: </dt>
			<dd class="wrap">{{content.city}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.country_code">
			<dt>Country Code: </dt>
			<dd class="wrap">{{content.country_code}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.country_name">
			<dt>Country: </dt>
			<dd class="wrap">{{content.country_name}}&nbsp;</dd>
		</dl>

		<dl class="dl-horizontal" ng-if="content.asn">
			<dt>ASN: </dt>
			<dd class="wrap">{{content.asn}}&nbsp;</dd>
		</dl>

	</div>
</div>
